home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_volod_scene.cog < prev    next >
Text File  |  1999-11-15  |  11KB  |  352 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEO_Volod_Scene.cog
  4. #
  5. # Introduce Volodnikov as Indy overhears his Babylon plans 
  6. #
  7. # [SXC & revised by HB]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ==============================================================================
  12.  
  13. symbols
  14.  
  15. # ................................. MESSAGES ...................................
  16.  
  17.     message        startup
  18.     message        crossed
  19.     message        callback
  20.     message        timer
  21.     
  22. # ................................. KEYFRAMES ..................................
  23.  
  24.     keyframe    in_kneel=0in_stand6.key                    local
  25.     keyframe    in_kneeldown=0in_stand1_bd_6.key        local # 32x
  26.     keyframe    in_kneelstand=0in_stand6_bd_1.key        local
  27.     
  28.     keyframe    vo_armsFold=vo_stand1_arms_front.key    local
  29.     keyframe    vo_armsBack=vo_stand2_arms_back.key        local
  30.     keyframe    vo_armsSide=vo_stand3_arms_side.key        local
  31.     keyframe    vo_thumpHands=vo_pie.key                local
  32.     keyframe    vo_walkFwd=vo_walk_fwd.key                local
  33.     keyframe    vo_walkLeft=vo_walk_left.key            local
  34.     keyframe    vo_walkRight=vo_walk_right.key            local
  35.     keyframe    in_kneel=in_crawl_idle.key              local
  36.  
  37.     keyframe    vo_waveLeft=0vo_waveleft_pace.key        local
  38.     keyframe    vo_waveRight=0vo_waveright_pace.key        local
  39.     keyframe    vo_waveBoth=0vo_waveboth_pace.key        local
  40.     keyframe    vo_walkBothUp=0vo_bothup_pace.key        local
  41.     keyframe    vo_glasses=0vo_glasses_2_2.key            local
  42.     keyframe    vo_leftup=0vo_leftup_2_1.key            local
  43.     keyframe    vo_rightup=0vo_rightup_3_3.key            local
  44.     keyframe    vo_bothup=0vo_bothup_3_3.key            local
  45.  
  46. # .................................. MODELS ....................................
  47.         
  48.     model          mod_in=gen_in_shirt.3do                    local
  49.     model          mod_in_HandHat=hand_in_hat.3do             local
  50.             
  51.     model          mod_vo=gen_vo.3do                        local 
  52.  
  53. # .................................. SOUNDS ....................................
  54.     
  55.     sound       vo_stayalert=To02v01a.wav                local # 7.4 sec
  56.     sound       vo_failnot=To02v01b.wav                    local # 9.6 sec
  57.  
  58.     sound       russtheme=mus_teo_volodscene.wav        local
  59.  
  60. # .................................. THINGS ....................................
  61.  
  62.     thing        player                                    local
  63.     thing       newindypos
  64.                             
  65.     thing        indyactor                                linkid=0
  66.     thing        volod                                    linkid=1
  67.  
  68.     thing        spetz0                                    linkid=2
  69.     thing       spetz1                                  linkid=2
  70.     thing       spetz2                                  linkid=2
  71.     thing       spetz3                                  linkid=2
  72.  
  73.     thing       spetzreal0                              linkid=2
  74.     thing       spetzreal1                              linkid=2
  75.     thing       spetzreal2                              linkid=2
  76.     thing       spetzreal3                              linkid=2
  77.     thing       spetzreal4                              linkid=2
  78.     thing       spetzreal5                              linkid=2
  79.     thing       spetzreal6                              linkid=2
  80.     thing       spetzreal7                              linkid=2
  81.     thing       spetzreal8                              linkid=2
  82.     thing       spetzreal9                              linkid=2
  83.                                                 
  84.     thing        vol_cam_1                                   nolink
  85.     thing        vol_cam_2                                nolink
  86.     thing        vol_cam_3                                nolink
  87.  
  88.     thing        vol_ct_1                                nolink
  89.     thing        vol_ct_2                                nolink
  90.  
  91.     thing        vol_mk_1                                nolink
  92.     thing        vol_mk_2                                nolink
  93.     thing        vol_mk_3                                nolink
  94.     thing        vol_mk_4                                nolink
  95.     
  96. # ............................. WORLD REFERENCES ...............................
  97.             
  98.     surface        crosurf                                 linkid=3
  99.     
  100. # ................................. VARIABLES ..................................
  101.         
  102.     int         isdone=0                                local
  103.                         
  104.     int            in_keyTrack1                            local
  105.     int            in_keyTrack2                            local
  106.  
  107.     int            pl_colltype                                local
  108.  
  109.     int            vo_keyTrack1                            local
  110.     int            vo_keyTrack2                            local
  111.                             
  112.     int            sender                                    local
  113.     int            curSound                                local
  114.     int            matAnimNum                                local
  115.     int            didThisBefore=0                            local
  116.  
  117.     int            curCam                                    local
  118.     int         x                                       local
  119.     
  120.     cog         TEO_Commie_Grid     #Added by JM     
  121.     
  122.  
  123. end
  124.  
  125. # ==============================================================================
  126.  
  127. code
  128.  
  129. # ..............................................................................
  130.  
  131. startup:
  132.  
  133.     # Pointer to Player
  134.     player = GetLocalPlayerThing();
  135.     SetThingFlags(spetz0, 0x80000);
  136.     SetThingFlags(spetz1, 0x80000);
  137.     SetThingFlags(spetz2, 0x80000);
  138.     SetThingFlags(spetz3, 0x80000);
  139.  
  140.     For (x=0; x<=9; x=x+1)
  141.     {
  142.         SetThingFlags(spetzreal0[x], 0x80000);
  143.     } 
  144.           
  145.     return;
  146.  
  147. # ..............................................................................
  148.  
  149. crossed:
  150.  
  151.     if ((GetSenderRef() == crosurf) && (GetSourceRef() == player) && (isdone == 0))
  152.     {   
  153.         isdone = 1;
  154.     
  155.         # Disable player
  156.         SetActorFlags(player, 0x200000);
  157.         StartCutscene(1);
  158.     
  159.         # Mood music!
  160.         PlaySoundLocal(russtheme, 0.65, 0, 0, 0);
  161.     
  162.         # Stop player & prep Indy...
  163.         MakeMeStop(player);
  164.         DeselectWeaponWait(player);
  165.         DeselectWeapon(player);
  166.         CopyPlayerHolsters(player, indyactor);
  167.         SetThingFlags(player, 0x80000);
  168.         ClearThingFlags(indyactor, 0x80000); # our actor
  169.         
  170.         # Prep Volodnikov...
  171.         ClearThingFlags(volod, 0x80000);
  172.         AISetCutSceneMode(volod);
  173.         AISetLookFrame(volod, 1);
  174.         AISetMoveSpeed(volod, 1.2);
  175.         
  176.         # Prep the Spetznaz...
  177.         ClearThingFlags(spetz0, 0x80000);
  178.         ClearThingFlags(spetz1, 0x80000);
  179.         ClearThingFlags(spetz2, 0x80000);
  180.         ClearThingFlags(spetz3, 0x80000);
  181.         AISetCutSceneMode(spetz0);
  182.         AISetCutSceneMode(spetz1);
  183.         AISetCutSceneMode(spetz2);
  184.         AISetCutSceneMode(spetz3);
  185.         SetWeaponModel(spetz0, 4);        
  186.         SetWeaponModel(spetz1, 4);    
  187.         SetWeaponModel(spetz2, 4);        
  188.         SetWeaponModel(spetz3, 4);        
  189.     
  190.         # Prep camera...
  191.         SetCameraLookInterp(2, 0); # kill pan & tilt
  192.         SetCameraPosInterp(2, 0); # kill dolly
  193.          
  194.         # Track Indy coming through door...
  195.         SetCameraFocus(2, vol_cam_1);
  196.         SetCameraSecondaryFocus(2, indyactor);
  197.         SetCurrentCamera(2);
  198.         SetCameraFOV(80, 0, 0.0);
  199.     
  200.         # Indy comes up to the idol...
  201.         AISetMoveSpeed(indyactor, 1.0);
  202.         AISetLookThingEyeLevel(indyactor, vol_mk_1);
  203.         AISetMoveThing(indyactor, vol_mk_1, 0);
  204.         AIWaitForStop(indyactor);
  205.     
  206.         # Volodnikov: "Comrades!  Stay alert!  The American...is a smart one..."
  207.         cursound = PlayVoice(volod, vo_stayalert, 1.0, 0); # 7.4 sec    
  208.         Sleep(0.5);
  209.             
  210.         # Get ready to dolly camera...
  211.         SetCameraInterpSpeed(2, 0.6);
  212.         SetCameraLookInterp(2, 1);
  213.         SetCAmeraPosInterp(2, 1);
  214.         
  215.         # Indy kneels to sneak a peek...
  216.         AIEnableHeadTracking(indyactor, vol_mk_3);
  217.         AISetLookThingEyeLevel(indyactor, vol_mk_2);
  218.         AISetMoveThing(indyactor, vol_mk_2, 0);
  219.         Sleep(1.3);
  220.         AISetLookThingEyeLevel(indyactor, vol_mk_3);
  221.          AIWaitForStop(indyactor);
  222.            
  223.         # Drop camera with Indy...
  224.         # in_keyTrack1 = PlayKey(indyactor, in_kneel, 2, 0x10, 0);
  225.         in_keyTrack1 = PlayKey(indyactor, in_kneeldown, 4, 0x14, 0); # 1.1 sec
  226.         Sleep(0.3); 
  227.         SetCameraFocus(2, vol_cam_2);
  228.         Sleep(0.7); # a little less time than it takes to kneel & more than to drop camera
  229.         
  230.         # Pan over to Volodnikov...
  231.         SetCameraInterpSpeed(2, 3.0);
  232.         Sleep(0.01);
  233.         SetCameraSecondaryFocus(2, vol_ct_2);
  234.         
  235.         # Tighten frame as we pan...
  236.         SetCameraFOV(40, 1, 3.0);
  237.         
  238.         # Move V to frame 1...
  239.         AISetMoveSpeed(volod, 1.0);
  240.         AISetLookFrame(volod, 1);
  241.         AIWaitForStop(volod);
  242.         AISetMoveFrame(volod, 1);  
  243.         AIWaitForStop(volod);
  244.     
  245.         # Move to frame 2...
  246.         AISetLookFrame(volod, 2);
  247.         AIWaitForStop(volod);
  248.         AISetMoveFrame(volod, 2);
  249.           WaitForSound(cursound);
  250.     
  251.           # Volodnikov: "That's why we summon Spetznaz...failed us...make sure you don't!"
  252.         cursound = PlayVoice(volod, vo_failnot, 1.0, 0); # 9.6 sec
  253.     
  254.         # Continue to frame 2...
  255.         AIWaitForStop(volod);
  256.           
  257.         # Move to frame 5...
  258.         AISetLookFrame(volod, 5);
  259.         AIWaitForStop(volod);
  260.         AISetMoveFrame(volod, 5);
  261.         AIWaitForStop(volod);
  262.         
  263.         # Volodnikov stops and faces his men...
  264.         AISetLookThing(volod, vol_mk_4);
  265.         AIWaitForStop(volod);
  266.         Sleep(0.5);
  267.         PlayKey(volod, vo_bothup, 4, 0x12, 1);
  268.         Sleep(1.0);
  269.         PlayKey(volod, vo_rightup, 4, 0x12, 1);
  270.     
  271.         AISetMoveSpeed(volod, 1.0);
  272.         AISetMoveFrame(volod, 6);
  273.         
  274.         # Move spetznaz to correct positions...
  275.         AISetMoveSpeed(spetz0, 1.0);
  276.         AISetMoveSpeed(spetz1, 1.0);
  277.         AISetMoveSpeed(spetz2, 1.0);
  278.         AISetMoveSpeed(spetz3, 1.0);
  279.         AISetLookFrame(spetz0, 1);
  280.         AISetLookFrame(spetz1, 1);
  281.         AISetLookFrame(spetz2, 1);
  282.         AISetLookFrame(spetz3, 1);
  283.         AISetMoveFrame(spetz2, 1);
  284.         AISetMoveFrame(spetz3, 1);
  285.         Sleep(1.0);
  286.         AISetMoveFrame(spetz0, 1);
  287.         AISetMoveFrame(spetz1, 1);
  288.         Sleep(2.0);
  289.         AISetLookFrame(spetz0, 2);
  290.         AISetLookFrame(spetz1, 2);
  291.         AISetLookFrame(spetz2, 2);
  292.         AISetLookFrame(spetz3, 2);
  293.         WaitForSound(cursound);
  294.         Sleep(3.5);
  295.            
  296.         # Re-position Indy...
  297.         AIDisableHeadTracking(indyactor); 
  298.         TeleportThing(indyactor, newindypos);
  299.         ClearThingFlags(player, 0x80000);
  300.         SetThingFlags(player, 0x10);
  301.         pl_colltype = GetCollideType(player);
  302.         TeleportThing(player, newindypos);    
  303.         SetCameraPosition(1, GetThingPos(vol_cam_3));
  304.         SetCollideType(player, 0);
  305.         Sleep(0.1);
  306.     
  307.         # Cut to side shot of Indy near the idol...
  308.         SetCameraLookInterp(2, 0);
  309.         SetCameraPosInterp(2, 0);
  310.         SetCameraFocus(2, vol_cam_3);
  311.         SetCameraSecondaryFocus(2, vol_ct_1);
  312.         SetCameraFOV(90, 0, 0.0);
  313.         StopKey(indyactor, in_keyTrack1, 0.0);
  314.         PlayKey(indyactor, in_kneelstand, 4, 0x12, 1);
  315.         
  316.         # Clean up & restore control...
  317.         ResetThing(player);
  318.         PlayMode(player, 1, 0);
  319.         ClearThingFlags(player, 0x10);
  320.     
  321.         DestroyThing(indyactor);
  322.         DestroyThing(volod);
  323.     
  324.         # Get rid of cutscene things...
  325.         DestroyThing(spetz0);
  326.         DestroyThing(spetz1);
  327.         DestroyThing(spetz2);
  328.         DestroyThing(spetz3);
  329.     
  330.         # Reveal the real Spetznaz with real AI's...
  331.         For (x=0; x<=9; x=x+1)
  332.         {
  333.             ClearThingFlags(spetzreal0[x], 0x80000);
  334.         } 
  335.     
  336.         SetCurrentCamera(1);
  337.         ResetCameraFOV(0, 0.0);
  338.     
  339.         EndCutscene();
  340.         SetCollideType(player, pl_colltype);
  341.         ClearActorFlags(player, 0x200000);
  342.         
  343.         SendMessageEx(TEO_Commie_Grid, 27, 0, 0, 0, 0);     //Added by JM
  344.     }
  345.     
  346. return;
  347.  
  348. # ..............................................................................
  349.  
  350. end
  351.  
  352.